home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: 31 May 1997
- // Author: gf
- //
- //
- // Procedure Name:
- // HotboxControlsMenu
- //
- // Description:
- // Create the user customizable Hotbox Controls Menu for hotbox
- //
- // Input Arguments:
- // parent to parent the menu to.
- //
- // Return Value:
- // None.
- //
-
- global proc updateHotboxOptionVarSettings() {
-
- optionVar
- -intValue isHotBoxModelingRowVisible `hotBox -q -mt`
- -intValue isHotBoxAnimationRowVisible `hotBox -q -at`
- -intValue isHotBoxDynamicsRowVisible `hotBox -q -dt`
- -intValue isHotBoxRenderingRowVisible `hotBox -q -rt`
- -intValue isHotBoxCommonRowVisible `hotBox -q -ct`
- -intValue isHotBoxPaneSpecificRowVisible `hotBox -q -pt`
- -intValue isHotBoxClothRowVisible `hotBox -q -clt`
- -intValue isHotBoxLiveRowVisible `hotBox -q -lt`
- -intValue isHotBoxRmbPopupsOn `hotBox -q -rmb`
- -intValue isHotBoxShowAll `hotBox -q -a`
-
- -intValue hotBoxTransparencyLevel `hotBox -q -tr`;
-
- if( `menuItem -exists hotboxModelingRowVisibilityCheckboxMenuItem` )
- menuItem -e -cb `hotBox -q -mt` hotboxModelingRowVisibilityCheckboxMenuItem;
-
- if( `menuItem -exists hotboxAnimationRowVisibilityCheckboxMenuItem` )
- menuItem -e -cb `hotBox -q -at` hotboxAnimationRowVisibilityCheckboxMenuItem;
-
- if( `menuItem -exists hotboxDynamicsRowVisibilityCheckboxMenuItem` )
- menuItem -e -cb `hotBox -q -dt` hotboxDynamicsRowVisibilityCheckboxMenuItem;
-
- if( `menuItem -exists hotboxRenderingRowVisibilityCheckboxMenuItem` )
- menuItem -e -cb `hotBox -q -rt` hotboxRenderingRowVisibilityCheckboxMenuItem;
-
- if( `menuItem -exists hotboxCommonRowVisibilityCheckboxMenuItem` )
- menuItem -e -cb `hotBox -q -ct` hotboxCommonRowVisibilityCheckboxMenuItem;
-
- if( `menuItem -exists hotboxPaneSpecificRowVisibilityCheckboxMenuItem` )
- menuItem -e -cb `hotBox -q -pt` hotboxPaneSpecificRowVisibilityCheckboxMenuItem;
-
- if( `menuItem -exists hotboxClothRowVisibilityCheckboxMenuItem` )
- menuItem -e -cb `hotBox -q -clt` hotboxClothRowVisibilityCheckboxMenuItem;
-
- if( `menuItem -exists hotboxLiveRowVisibilityCheckboxMenuItem` )
- menuItem -e -cb `hotBox -q -lt` hotboxLiveRowVisibilityCheckboxMenuItem;
-
- }
-
-
- global proc toggleMainMenubar( int $state ){
-
- global string $gMainWindow;
-
- optionVar -iv mainWindowMenubarVis $state;
-
- window -e -mbv $state $gMainWindow;
- }
-
-
- global proc buildWinOptions( string $parent)
- {
- setParent -m $parent;
-
- // Make sure this submenu is rebuilt
- // everytime to ensure checkboxes are updated
- //
- if( `menu -q -ni $parent` != 0 ) {
- //
- // Menu is built already - just clear it.
- //
- menu -e -deleteAllItems $parent;
- }
-
- // Fix for Bug #156604
- // On the Mac - We do-not provide option to show/hide Main Menubar
- // as this is a *really *nasty thing to do*. It is really only
- // intended for games and such which want to go into fullscreen mode
- //
- if (!`about -mac`) {
- menuItem -l "Show Main Menubar"
- -ecr false
- -cb `optionVar -q mainWindowMenubarVis`
- -c "toggleMainMenubar #1";
-
- }
- menuItem -l "Show Pane Menubars"
- -ecr false
- -cb `optionVar -q allowMenusInPanels`
- -c "toggleMenuBarsInAllPanels #1";
-
- }
-
- global proc buildHotboxStyleMenu(string $parent)
- {
- setParent -m $parent;
-
- // Make sure this submenu is rebuilt
- // everytime to ensure checkboxes are updated
- //
- if( `menu -q -ni $parent` != 0 ) {
- //
- // Menu is built already - just clear it.
- //
- menu -e -deleteAllItems $parent;
- }
-
- menuItem -l "Zones and Menu Rows"
- -c "hotBox -dh";
- menuItem -l "Zones Only"
- -c "hotBox -dzo";
- menuItem -l "Center Zone Only"
- -c "hotBox -dco";
- menuItem -divider true;
- menuItem -l "Center Zone RMB Popups"
- -cb `hotBox -q -rmb`
- -c "hotBox -rmb #1; updateHotboxOptionVarSettings()"
- hotboxRmbPopupsCheckboxMenuItem;
-
- }
-
-
-
- // It's preferable for this code to not be contained within
- // a procedure, because this code will only be run once,
- // and procedure definitions eat up memory.
- //
- //global proc HotboxControlsMenu( string $parent )
- //{
- // setParent -m $parent;
- // if( `menu -q -ni $parent` != 0 ) {
- // //
- // // Menu is built already - just return
- // //
- // return;
- // }
-
- menuItem -rp "N" -l "Show Modeling" -subMenu true;
- menuItem -rp "N" -l "Modeling Only"
- -c ("hotBox -mo; setMenuMode \"Modeling\"; updateHotboxOptionVarSettings()");
- menuItem -rp "S" -l "Show/Hide Modeling"
- -cb `hotBox -q -mt`
- -c "hotBox -mt #1; updateHotboxOptionVarSettings()"
- hotboxModelingRowVisibilityCheckboxMenuItem;
- setParent -m ..;
-
- menuItem -rp "E" -l "Show Animation" -subMenu true;
- menuItem -rp "E" -l "Animation Only"
- -c ("hotBox -ao; setMenuMode \"Animation\"; updateHotboxOptionVarSettings()");
- menuItem -rp "W" -l "Show/Hide Animation"
- -cb `hotBox -q -at`
- -c "hotBox -at #1; updateHotboxOptionVarSettings()"
- hotboxAnimationRowVisibilityCheckboxMenuItem;
- setParent -m ..;
-
- menuItem -rp "S" -l "Show Dynamics" -subMenu true;
- menuItem -rp "S" -l "Dynamics Only"
- -c ("hotBox -do; setMenuMode \"Dynamics\"; updateHotboxOptionVarSettings()");
- menuItem -rp "N" -l "Show/Hide Dynamics"
- -cb `hotBox -q -dt`
- -c "hotBox -dt #1; updateHotboxOptionVarSettings()"
- hotboxDynamicsRowVisibilityCheckboxMenuItem;
- setParent -m ..;
-
- menuItem -rp "SW" -l "Show All"
- -c "hotBox -a true; updateHotboxOptionVarSettings()";
- setParent -m ..;
-
- menuItem -rp "SE" -l "Hide All"
- -c "hotBox -a false; updateHotboxOptionVarSettings()";
- setParent -m ..;
-
- menuItem -rp "W" -l "Show Rendering" -subMenu true;
- menuItem -rp "W" -l "Rendering Only"
- -c ("hotBox -ro; setMenuMode \"Rendering\"; updateHotboxOptionVarSettings()");
- menuItem -rp "E" -l "Show/Hide Rendering"
- -cb `hotBox -q -rt`
- -c "hotBox -rt #1; updateHotboxOptionVarSettings()"
- hotboxRenderingRowVisibilityCheckboxMenuItem;
- setParent -m ..;
-
-
- // Overflow
- //
- menuItem -l "Show Common Menus"
- -cb `hotBox -q -ct`
- -c "hotBox -ct #1; updateHotboxOptionVarSettings()"
- hotboxCommonRowVisibilityCheckboxMenuItem;
- menuItem -l "Show Pane Specific Menus"
- -cb `hotBox -q -pt`
- -c "hotBox -pt #1; updateHotboxOptionVarSettings()"
- hotboxPaneSpecificRowVisibilityCheckboxMenuItem;
-
- // Show the Cloth and Live Menus only if licenseType of Maya is 'Unlimited'
- //
- string $licenseType = `about -p`;
- $licenseType = match("Unlimited", $licenseType);
- if ( $licenseType == "Unlimited" )
- {
- menuItem -l "Show Cloth Menus"
- -cb `hotBox -q -clt`
- -c "hotBox -clt #1; updateHotboxOptionVarSettings()"
- hotboxClothRowVisibilityCheckboxMenuItem;
-
-
- menuItem -l "Show Live Menus"
- -cb `hotBox -q -lt`
- -c "hotBox -lt #1; updateHotboxOptionVarSettings()"
- hotboxLiveRowVisibilityCheckboxMenuItem;
-
- }
- // Transparency control items
- int $percentage = `optionVar -query hotBoxTransparencyLevel`;
- menuItem -l "Set Transparency" -subMenu true;
- if (`about -mac`) {
- menuItem -l "Unsupported = 100%" -en 0;
- } else {
- radioMenuItemCollection;
- menuItem -l "0%"
- -rb ($percentage == 0)
- -c "hotBox -tr 0; updateHotboxOptionVarSettings()";
- menuItem -l "25%"
- -rb ($percentage == 25)
- -c "hotBox -tr 25; updateHotboxOptionVarSettings()";
- menuItem -l "50%"
- -rb ($percentage == 50)
- -c "hotBox -tr 50; updateHotboxOptionVarSettings()";
- menuItem -l "75%"
- -rb ($percentage == 75)
- -c "hotBox -tr 75; updateHotboxOptionVarSettings()";
- menuItem -l "100%"
- -rb ($percentage == 100)
- -c "hotBox -tr 100; updateHotboxOptionVarSettings()";
- }
- setParent -m ..;
-
- string $menu = `menuItem -l "Hotbox Style" -subMenu true`;
- menu -e -pmc ( "buildHotboxStyleMenu " + $menu ) $menu;
- setParent -m ..;
-
- menuItem -divider true;
-
- string $menu = `menuItem -l "Window Options" -subMenu true`;
- menu -e -pmc ( "buildWinOptions " + $menu ) $menu;
- setParent -m ..;
- //}
-
-